﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace Angle
{
    using Microsoft.Owin.Security.Provider;

  
    public class AddDemoAddInput
    {
        public double Num1 { get; set; }

        public double Num2 { get; set; }
    }

    public class AddDemoAddOutput
    {
        public double Result { get; set; }
    }

    public class AddDemoController : ApiController
    {
        public AddDemoAddOutput Add([FromBody]AddDemoAddInput addInput)
        {
           
            return new AddDemoAddOutput
                       {
                         Result  = addInput.Num1 + addInput.Num2
            } ;
        }



        /*// GET api/<controller>
        public IEnumerable<string> Get()
        {
            return new string[] { "value1", "value2" };
        }

        // GET api/<controller>/5
        public string Get(int id)
        {
            return "value";
        }

        // POST api/<controller>
        public void Post([FromBody]string value)
        {
        }

        // PUT api/<controller>/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/<controller>/5
        public void Delete(int id)
        {
        }*/


    }
}